﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Web.UI.HtmlControls;


namespace WebApplication5
{
    public partial class WebForm4 : System.Web.UI.Page
    {
        private DataClassesOnlineCollegeManagementDataContext dc = new DataClassesOnlineCollegeManagementDataContext();
        protected void Page_Load(object sender, EventArgs e)
        {
            int idnews = Convert.ToInt32(Request.QueryString["idnews"]);
            news_tbl n = this.dc.news_tbls.Single(s => s.idnews == Convert.ToInt32(idnews));

            this.LabelTitle.Text = n.title.ToString();
            this.Image1.ImageUrl = "images/news/" + n.photo;
            this.LabelContent.Text = n.content.ToString();
        }
    }
}